const express = require('express')
const app = express()

app.use((req,res,next)=>{
    console.log(req.url);
    next()
})
app.use((req,res,next)=>{
    console.log(`第三个`);
    next()
})
app.use((req,res,next)=>{
    console.log(`第二个中间件函数 :${req.url}`);
    next()
})

// 以 /XXX开头匹配
app.use('/abc',(req,res,next)=>{
    console.log(`/abc 开头的`);
    next()
})

app.get('/abc',(req,res,next)=>{
    console.log(`完全匹配`);
})





app.listen(3000,()=>{
    console.log(`server is running ...`);
})